@echo off
chcp 65001
echo 正在创建Label Studio的conda环境...

:: 检查是否已存在conda环境
conda info --envs | findstr "labelstudio" > nul
if errorlevel 1 (
    echo 创建conda环境...
    conda create -n labelstudio python=3.9 -y
    call conda activate labelstudio
    echo 安装Label Studio...
    pip install label-studio
    echo 安装Label Studio ML Backend...
    pip install label-studio-ml
) else (
    echo Label Studio conda环境已存在
    call conda activate labelstudio
    echo 安装Label Studio...
    pip install label-studio
    echo 安装Label Studio ML Backend...
    pip install label-studio-ml
)

echo conda环境准备完成
pause 